package com.foo;

import java.util.ArrayList;
import java.util.List;

public class Canvas {
	
	private List<Graphic> graphics;
	
	public Canvas(){
		this.graphics = new ArrayList<Graphic>();
	}

	public Canvas(List<Graphic> graphics){
		this();
		this.graphics.addAll(graphics);
	}
	
	public void draw(){
		for (Graphic g:this.graphics) {
			g.draw();
		}
	}
	
	public void addGraphic(Graphic g){
		this.graphics.add(g);
	}

}
